///**
// * author      : dormi330
// * date        : 2018/7/16
// * description : TODO
// */
//
//package com.deep.trade.adaptor.required.mq.rabbitmq;
//
//import com.deep.trade.adaptor.required.mq.MsgSender;
//import com.deep.trade.adaptor.required.mq.BaseMssage;
//import com.deep.trade.common.BaseDto;
//import org.springframework.amqp.core.AmqpTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
//@Component
//public class RabbitmqMsgSender implements MsgSender {
//
//    @Autowired
//    private AmqpTemplate rabbitTemplate;
//
//    public void sendMsg(String topic, BaseDto obj) throws IOException {
//        BaseMssage msg = BaseMssage.fromObject(obj);
//        String msgStr = msg.uglyString();
//        this.rabbitTemplate.convertAndSend(topic, msgStr.getBytes("UTF-8"));
//    }
//
//}